﻿using System;
using System.Collections.Generic;
using Nop.Web.Framework.Mvc;
using Nop.Core.Domain.Orders;
using Nop.Web.Models.Catalog;

namespace Nop.Web.Models.Customer
{
    public partial class CustomerOrderListModel : BaseNopModel
    {
        public CustomerOrderListModel()
        {
            Orders = new List<OrderDetailsModel>();
            RecurringOrders = new List<RecurringOrderModel>();
            CancelRecurringPaymentErrors = new List<string>();
            PagingFilteringContext = new SearchPagingFilteringModel();

        }

        
        public IList<OrderDetailsModel> Orders { get; set; }
        public IList<RecurringOrderModel> RecurringOrders { get; set; }
        public IList<string> CancelRecurringPaymentErrors { get; set; }

        public CustomerNavigationModel NavigationModel { get; set; }

        public OrderStatus orderState { get; set; }

        public CustomerInfoModel customerModel { get; set; }

        public SearchPagingFilteringModel PagingFilteringContext { get; set; }

        public int TopicPageSize { get; set; }
        public int TopicTotalRecords { get; set; }
        public int TopicPageIndex { get; set; }


        #region Nested classes
        public partial class OrderDetailsModel : BaseNopEntityModel
        {
             public OrderDetailsModel()
             {
                 ProductModel = new List<Nop.Web.Models.Order.OrderDetailsModel.OrderProductVariantModel>();
             }
            //订单总金额
            public string OrderNumber { get; set; }
            public string OrderTotal { get; set; }
            public bool IsReturnRequestAllowed { get; set; }
            public string OrderStatus { get; set; }
            public DateTime CreatedOn { get; set; }
            //商品信息
            public List<Nop.Web.Models.Order.OrderDetailsModel.OrderProductVariantModel> ProductModel { get; set; }
            //顾客信息
            public CustomerInfoModel CustomerModel { get; set; }
          
        }
        public partial class RecurringOrderModel : BaseNopEntityModel
        {
            public string StartDate { get; set; }
            public string CycleInfo { get; set; }
            public string NextPayment { get; set; }
            public int TotalCycles { get; set; }
            public int CyclesRemaining { get; set; }
            public int InitialOrderId { get; set; }
            public bool CanCancel { get; set; }
        }


        #endregion
    }
}